package cn.songhaiqing.walle.bean;

import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;

public class HistoryHour {
    private int agreement;
    private double burn;
    private Calendar date;
    private int minute_dif;
    private int sleepGrade;
    private String[] sleeps = null;
    private int step;

    public int getMinute_dif() {
        return this.minute_dif;
    }

    public void setMinute_dif(int minute_dif2) {
        this.minute_dif = minute_dif2;
    }

    public Calendar getDate() {
        return this.date;
    }

    public void setDate(Calendar date2) {
        this.date = date2;
    }

    public int getStep() {
        return this.step;
    }

    public void setStep(int step2) {
        this.step = step2;
    }

    public double getBurn() {
        return this.burn;
    }

    public void setBurn(double burn2) {
        this.burn = burn2;
    }

    public int getSleepGrade() {
        return this.sleepGrade;
    }

    public void setSleepGrade(int sleepGrade2) {
        this.sleepGrade = sleepGrade2;
    }

    public int getAgreement() {
        return this.agreement;
    }

    public void setAgreement(int agreement2) {
        this.agreement = agreement2;
    }

    public String[] getSleeps() {
        return this.sleeps;
    }

    public void setSleeps(String[] sleeps2) {
        this.sleeps = sleeps2;
    }

    public String getSleepString() {
        String result = "";
        if (this.sleeps != null) {
            for (int i = 0; i < this.sleeps.length; i++) {
                result = result + this.sleeps[i];
                if (i < this.sleeps.length - 1) {
                    //result = result + DatabaseAdapter.NEW_SLEEP_SPLIT;
                }
            }
        }
        return result;
    }

    public String toString() {
        return "HistoryHour:\tdate--" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.date.getTime()) + "\tstep--:" + this.step + "\t\tburn:" + this.burn + "\t\tsleepGrade" + this.sleepGrade + "\t\tagreement:" + this.agreement + "\t\tsleeps:" + Arrays.toString(this.sleeps);
    }

    public HistoryHour copy() {
        HistoryHour hour = new HistoryHour();
        hour.setMinute_dif(this.minute_dif);
        hour.setAgreement(this.agreement);
        hour.setBurn(this.burn);
        hour.setDate(this.date);
        hour.setSleepGrade(this.sleepGrade);
        hour.setStep(this.step);
        hour.setSleeps(this.sleeps);
        return hour;
    }
}
